package cn.com.cifi.mars.constant;

import cn.com.cifi.mars.util.StrUtils;

public enum BudgetCycleEnum {

	ALL_YEAR_BUDGET("all_year_budget","当年全年预算编制期"),
	MID_YEAR_BUDGET("mid_year_budget","当年年中预算编制期"),
	NEXT_ALL_YEAR_BUDGET("next_all_year_budget","下一年全年预算编制期"),
    ;

    private String key;
    private String value;

    BudgetCycleEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
    
    public static String getValueByKey(String key){
    	if(StrUtils.isEmpty(key)) {
    		return null;
    	}
        for(BudgetCycleEnum eunm:BudgetCycleEnum.values()){
            if(key.equals(eunm.getKey())){
                return eunm.getValue();
            }
        }
        return  null;
    }

}
